package com.ezjie.ielts.view.agenda;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

public class CircleView extends View {
	
	Paint p = new Paint();
	int colorRes = 0;
	
	public CircleView(Context context) {
		super(context);
	}
	
	public CircleView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public CircleView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}
	
	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		p.setColor(colorRes);
		p.setAntiAlias(true);
        //����һ��С��  
        canvas.drawCircle(getWidth()/2, getHeight()/2, 7, p); 
	}
	
	public void setColor(int colorRes){
		this.colorRes = colorRes;
		invalidate();
	}

}
